﻿#include "hanlddataitem.h"

HanldDataitem::HanldDataitem(QObject *parent) : QObject(parent)
{

    connect(HanldData::gestance(),SIGNAL(sigAddCurrentData(int) ),this,SIGNAL(sigAddCurrentData(int) ));
    connect(HanldData::gestance(),SIGNAL(sigCurrentData(int) ),this,SIGNAL(sigCurrentData(int) ));
    connect(HanldData::gestance(),SIGNAL(sigRemoveDevice() ),this,SIGNAL(sigRemoveDevice() ));
    connect(HanldData::gestance(),SIGNAL(sigAddDevice() ),this,SIGNAL(sigAddDevice() ));


}

HanldDataitem::~HanldDataitem()
{

}

bool HanldDataitem::initHandl()
{
    return HanldData::gestance()->initHandl();
}

int HanldDataitem::readData()
{
    return HanldData::gestance()->readData();
}

int HanldDataitem::readCurrentData()
{
    return HanldData::gestance()->readCurrentData();
}

int HanldDataitem::readHeartData()
{
    return HanldData::gestance()->readHeartData();
}

int HanldDataitem::readMcuData()
{
    return HanldData::gestance()->readMcuData();
}

int HanldDataitem::readMcuClearData()
{
    return HanldData::gestance()->readMcuClearData();
}

int HanldDataitem::writeData(int type, int lens)
{
    return HanldData::gestance()->writeData(type,  lens);
}

void HanldDataitem::setCurrentValue(QString nums)
{
    return HanldData::gestance()->setCurrentValue(nums);
}

int HanldDataitem::getCurrentValue()
{
    return HanldData::gestance()->getCurrentValue();
}
